package com.mill.scala.config

import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.SpringBootConfiguration
import org.springframework.web.servlet.config.annotation.{InterceptorRegistry, WebMvcConfigurationSupport}

//@SpringBootConfiguration
class MyWebConfig @Autowired() (val myHandlerInterceptor:MyHandlerInterceptor)
  extends WebMvcConfigurationSupport
{
  override def addInterceptors(registry: InterceptorRegistry): Unit ={
    registry.addInterceptor(myHandlerInterceptor).addPathPatterns("/**")
  }

}
